package redis

import (
	"context"
	"github.com/go-redis/redis/v8"
	"srv/model/mysql"
)

func List(like []mysql.Goods) {
	for _, v := range like {
		Rdb.ZAdd(context.Background(), "like", &redis.Z{
			Score:  float64(v.ID),
			Member: v.GoodsTitle,
		})
	}
	return
}
func Likes(lint string) []redis.Z {
	val := Rdb.ZRevRangeWithScores(context.Background(), lint, 0, 9).Val()
	return val
}
